1
general::
Talk nonsense; also, hold forth about something one knows very little about. For example, He was talking through his hat when he described the shipwreck, or Mother went on and on about various screwdrivers but in fact she was talking through her hat. The allusion in this idiom makes no sense either, which may be the point. [Late 1800s]
American Heritage Idioms